package olap4cloud.hadop.statistic;

import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.util.ToolRunner;

public class FullExcuter {
	public static void main(String[] args) {
		String outputFolder = "Statistic/system-" + +System.currentTimeMillis();
		
		Configuration conf = new Configuration();

		conf.addResource("conf/core-site.xml");
		conf.addResource("conf/hbase-site.xml");
		
		System.out.println(conf.getRaw("fs.default.name"));
		System.out.println(conf.getRaw("hbase.rootdir"));
		
		Configuration hconf = HBaseConfiguration.create(conf);
		JobStatistic jobStatistic = new JobStatistic();
		jobStatistic.outPutFolder = outputFolder;
		try {
			ToolRunner.run(hconf, jobStatistic, args);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		System.out.println(outputFolder);
		
		MainDriver main = new MainDriver();
		try {
			main.increDataToHbase(outputFolder);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
